import numpy as np

X=[[1,2,3],[4,5,6],[-1,-2,-3]]
fft = np.fft.rfft(X, axis=1)
print 'fft'
print fft
fft = np.abs(fft)
print 'abs'
print fft

a = np.fft.rfft([[0, 1, 0, 0,7,9,8],[1, 0, 1, 1,5,9,9]],axis=1)
print a